import { WeaTools } from 'ecCom';

// 获取列表数据
export const getData = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/getCompanyList', 'POST', params);
// 获取弹出框Tab页签
export const getTabData = () => WeaTools.callApi('/api/odocExchange/exchangeCompany/getCompanyTabs', 'POST');
// 新增
export const addData = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/addCompanyInfo', 'POST', params);
// 保存并设置
export const addAndSet = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/addAfterSetConpanyInfo', 'POST', params);
// 单位信息修改
export const changeData = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/addAfterSetConpanyInfo', 'POST', params);
// 单位信息删除
export const deleteData = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/deleteCompany', 'POST', params);
// 单位管理员列表
export const getUnitAdmin = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/adminGetFormItems', 'POST', params);
// 收发文员管理table数据
export const getClerkList = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/getUserList', 'POST', params);
// 文员管理添加文员form数据
export const getClerkForm = () => WeaTools.callApi('/api/odocExchange/exchangeCompany/userGetFormItems', 'POST', '');
// 文员管理添加文员
export const addClerk = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/saveUser', 'POST', params);
// 编辑单位文员
export const editClerk = params => WeaTools.callApi('/api/hrm/password/changePassword', 'POST', params);
// 文员管理删除文员
export const deleteClerk = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/deleteUser', 'POST', params);
// 获取单位字段
export const getUnitField = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/getFieldsConditionById', 'POST', params);
// 保存单位管理员输入保存
export const inputSaveUnitAdmin = params => WeaTools.callApi('/api/hrm/resource/new/addResourceBase', 'POST', params);
// 保存单位管理员浏览按钮
export const broSaveUnitAdmin = params => WeaTools.callApi('/api/hrm/organizationvirtual/addResourceToVirtual', 'POST', params);
// 保存对应字段
export const saveFields = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/saveFields', 'POST', params);
// 基本信息和新建单位的表单
export const getBaseInfo = () => WeaTools.callApi('/api/odocExchange/exchangeCompany/getConditionAdd', 'POST');
// 保存单位id
export const saveAdmin = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/saveAdmin', 'POST', params);
// 编辑单位form
export const editUnit = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/getCompanyCondition', 'POST', params);
// 高级搜索的form
export const getSearchForm = () => WeaTools.callApi('/api/odocExchange/exchangeCompany/getCompanySearchItems', 'POST');
// 获取日志参数
export const getCompanyLogType = () => WeaTools.callApi('/api/odocExchange/exchangeCompany/getCompanyLogType', 'POST');
// 单位文员修改密码
export const clerkChangePassword = params => WeaTools.callApi('/api/hrm/password/changePassword', 'POST', params);
// 管理员修改单位文员
export const editClerkChangePassword = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/editUser', 'POST', params);
// 获取收发文单位列表数据
export const getRecUnitTable = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/getReceiveOrSendUnitList', 'POST', params);
// 获取收发文单位form接口
export const getReceiveOrSendUnitForm = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/getReceiveOrSendUnitForm', 'POST', params);
// 收发文单位新增/修改接口
export const addOrEditReceiveOrSendUnit = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/saveOrUpdateReceiveOrSendUnit', 'POST', params);
// 收发文单位冻结/删除接口
export const deleteReceiveOrSendUnit = params => WeaTools.callApi('/api/odocExchange/exchangeCompany/deleteReceiveOrSendUnit', 'POST', params);

